#define _CRT_SECURE_NO_WARNINGS 1

#include "sort.h"
#include "stackandQ.h"



int main()
{
	//int arr[] = { 9, 1, 1, 1, 1, 1, 1, 1 };
	//int arr[] = { 27, 15, 19, 18, 28, 34, 65, 49, 25, 37 };
	//int arr[] = { 5, 5, 4, 2, 1, 5, 5 };
	//int arr[] = { 1, 2, 3, 6, 8, 10 };
	int arr[50] = { -111, -1, 100, 140, 2, 45,123,643,78,32,56,13,57,342,642
		- 1, 31, 31,1,2,2,5,7,12,25,634,66,324, 342,57,764,342,234,2,235,675
		- 35, -436, 674,8,84,222,2349, -23424, -25, -4, -328, -67,768, 546 };

	//SelectSort(arr, sizeof(arr) / sizeof(arr[0]));
	
	//HeapSort(arr, sizeof(arr) / sizeof(arr[0]));

	//QuickSort(arr, 0, sizeof(arr) / sizeof(arr[0]) - 1);

	//BubbleSort(arr, sizeof(arr) / sizeof(arr[0]));

	QuickSortNonR(arr, 0, sizeof(arr) / sizeof(arr[0]) - 1);
	for (int i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		printf("%d ", arr[i]);
	}

	return 0;
}